﻿using System;
using StockholmsStad.Runtime.Serialization.DataContract;

namespace StockholmsStad.Windows.UI.Modules.Ceremony.BusinessEntities
{
    public class CeremonyScheduleItem
    {
        public int Id { get; set; }
        public DateTime Date { get; set; }

        public string DisplayHP
        {
            get { return HP ? "Ja" : "Nej"; }
        }

        public string DisplayInterpreter
        {
            get { return Interpreter.HasValue ? (Interpreter.Value ? "Ja" : "") : ""; }
        }

        public string DisplayTime
        {
            get
            {
                return string.Format("{0}/{1}", TimeBlock.StartDateTime.ToString("HH:MM"),
                                     TimeBlock.StartDateTime.AddMinutes(TimeBlock.Interval).ToString("HH:MM"));
            }
        }

        public string DisplayCouple
        {
            get { return string.Format("{0} {1}/{2} {3}", Couple.Person1.FirstNames, Couple.Person1.LastName, 
                Couple.Person2.FirstNames, Couple.Person2.LastName); }
        }

        public Couple Couple { get; set; }

        public bool CancelBooking { get; set; }
        public bool HP { get; set; }

        public string CeremonyLanguage { get; set; }
        public string Note { get; set; }

        public bool? Interpreter { get; set; }
        public MinisterTimeBlock TimeBlock { get; set; }

    }
}
